multiples_of_3 = [n for n in range(3, 31, 3)]
for n in multiples_of_3:
    print(n)